package org.example;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class SonGeneric<T> extends Father{

    public T t;

    public SonGeneric() {
        super();

        t = (T) "abc";
        System.out.println("子类中t的类型:"+t.getClass());

        System.out.println("进入子类SonGeneric构造-----注意这里的this是----"+this);

        Class<? extends SonGeneric> aClass = this.getClass();
        Type type = aClass.getGenericSuperclass();
        System.out.println("type is "+type );
        System.out.println("type instanceof ParameterizedType----"+(type instanceof ParameterizedType) );
    }
}
